Class hookexecutor

hookexecutor contains functions which can modify the game executable during the startup hook functions OnStart and OnLocaleLoad.

Functions defined here are temporary, and will likely move in the future once more of the internal game tables are exposed through the Lua interface.

Methods

hookexecutor:ReplacePerk (perkTable, perkId) ReplacePerk changes the data for a perk in the Fallout: Tactics perk table.
hookexecutor:AddLocaleString (key, value) AddLocaleString adds a locale string mapping from within the Lua script.

Types

hookexecutor.PerkTable PerkTable format used in ReplacePerk.


Methods

hookexecutor:ReplacePerk (perkTable, perkId)
ReplacePerk changes the data for a perk in the Fallout: Tactics perk table. This allows for the requirements and permanent bonuses from perks to be changed, and for currently disabled perk slots to be used for custom behavior.

Parameters:

  • perkTable A table formatted as PerkTable, with the new parameters to use for the perk.
  • perkId The index into the perk table to modify. This can be determined by finding the location of the desired perk slot in the entity editor, and starts from 0.

Returns:

    None.
hookexecutor:AddLocaleString (key, value)
AddLocaleString adds a locale string mapping from within the Lua script. This allows a script to provide a translation string without having to edit the BOS locale files.

Parameters:

  • key The key (name) of the locale string to add.
  • value The text (value) of the locale string to add.

Returns:

    None.

Types

hookexecutor.PerkTable
PerkTable format used in ReplacePerk. All fields are optional. If defaulted, integer parameters default to 0, and strings default to empty string, "".

Fields:

  • minlevel The minimum character level required to be eligible to select this perk.
  • maxperktaken The number of times a player is allowed to select this perk for a character.
  • bonusstat If a perk applies a permanent bonus to a stat, provide the name of the stat here. The name should match the name of the stat in the Entity editor. Leave as an empty string, "", if no bonus should be applied.
  • bonusamt How much to add or remove from the bonus stat.
  • requiredstat1 The first skill requirement, for perks which have minimum skill levels to be selected. If no skill requirement is needed for the perk, leave as an empty string, "".
  • requiredamt1 The minimum skill level of the skill listed in requiredstat1.
  • and_or_flag For perks with two skill requirements, this flag indicates whether only one of the two requirements must be met (value of 1), or if both requirements need to be met (value of 2).
  • requiredstat2 The second skill requirement, if any, for perks which have minimum skill levels to be selected. If no second skill requirement is needed for the perk, leave as an empty string, "".
  • requiredamt2 The minimum skill level of the skill listed in requiredstat2.
  • requiredST The minimum Strength attribute in order to use this perk.
  • requiredPE The minimum Perception attribute in order to use this perk.
  • requiredEN The minimum Endurance attribute in order to use this perk.
  • requiredCH The minimum Charisma attribute in order to use this perk.
  • requiredIN The minimum Intelligence attribute in order to use this perk.
  • requiredAG The minimum Agility attribute in order to use this perk.
  • requiredLK The minimum Luck attribute in order to use this perk.
  • prohibitedRace A comma-separated list of races which are prohibited from selecting the perk. If no prohibition, leave as an empty string, "".
  • requiredRace A string indicating the only race allowed to select the perk. If no limitation, leave as an empty string, "".
generated by LDoc 1.4.6 Last updated 2021-05-07 19:14:47